<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>排班模板管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {

		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/phy/tSchedueTemplate/">排班模板列表</a></li>
		<shiro:hasPermission name="phy:tSchedueTemplate:edit"><li><a href="${ctx}/phy/tSchedueTemplate/form">排班模板添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="tSchedueTemplate" action="${ctx}/phy/tSchedueTemplate/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>医生名称：</label>
				<form:input path="doctorName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>所属诊室：</label>
				<form:input path="officeName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>所属机构：</label>
				<form:input path="tenantName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<shiro:hasPermission name="phy:sys:id"><th>id</th></shiro:hasPermission>
				<th>所属机构</th>
				<th>诊室名称</th>
				<th>医生名称</th>
				<th>周一</th>
				<th>周二</th>
				<th>周三</th>
				<th>周四</th>
				<th>周五</th>
				<th>周六</th>
				<th>周日</th>
				<th>上午号源数</th>
				<th>下午号源数</th>
				<th>更新时间</th>
				<th>更新者</th>
				<th>备注信息</th>
				<shiro:hasPermission name="phy:tSchedueTemplate:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tSchedueTemplate">
			<tr>
				<shiro:hasPermission name="phy:sys:id">
					<td>
							${tSchedueTemplate.id}
					</td>
				</shiro:hasPermission>
				<td>${tSchedueTemplate.tenant.tenantName}</td>
				<td>${tSchedueTemplate.office.officeName}</td>
				<c:if test="${empty tSchedueTemplate.doctor.remarks}">
					<td>${tSchedueTemplate.doctor.doctorName}</td>
				</c:if>
				<c:if test="${not empty tSchedueTemplate.doctor.remarks}">
					<td>${tSchedueTemplate.doctor.doctorName}(${tSchedueTemplate.doctor.remarks})</td>
				</c:if>
				<td>
					${fns:getDictLabel(tSchedueTemplate.mon, 'schedue_template', '')}
				</td>
				<td>
					${fns:getDictLabel(tSchedueTemplate.tue, 'schedue_template', '')}
				</td>
				<td>
					${fns:getDictLabel(tSchedueTemplate.wed, 'schedue_template', '')}
				</td>
				<td>
					${fns:getDictLabel(tSchedueTemplate.thu, 'schedue_template', '')}
				</td>
				<td>
					${fns:getDictLabel(tSchedueTemplate.fri, 'schedue_template', '')}
				</td>
				<td>
					${fns:getDictLabel(tSchedueTemplate.sat, 'schedue_template', '')}
				</td>
				<td>
					${fns:getDictLabel(tSchedueTemplate.sun, 'schedue_template', '')}
				</td>
				<td>
					${tSchedueTemplate.am}
				</td>
				<td>
					${tSchedueTemplate.pm}
				</td>
				<td>
					<fmt:formatDate value="${tSchedueTemplate.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
						${tSchedueTemplate.updateBy.name}
				</td>
				<td>
					${tSchedueTemplate.remarks}
				</td>
				<shiro:hasPermission name="phy:tSchedueTemplate:edit"><td>
    				<a href="${ctx}/phy/tSchedueTemplate/form?id=${tSchedueTemplate.id}">修改</a>
					<a href="${ctx}/phy/tSchedueTemplate/delete?id=${tSchedueTemplate.id}" onclick="return confirmx('确认要删除该排班模板吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
